package com.rsk.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import com.alibaba.dubbo.config.annotation.Service;
import com.rsk.dao.SysUsersRepository;
import com.rsk.service.SysUsersService;


@Service
public class SysUsersServiceImpl implements SysUsersService{
	
	@Autowired
	private SysUsersRepository sysUsersRrepository;

	@SuppressWarnings({ "unchecked", "rawtypes" })
	@Transactional
	public Map<String, String> login(String userName) {
		Map<String, String> map = new HashMap<String, String>();
		List<Map> list = sysUsersRrepository.login(userName);
		if(!list.isEmpty()&&list.size()>0){
			map = list.get(0);
		}
		return map;
	}
	
	
}
